package com.lu.library.utils

import com.blankj.utilcode.util.LogUtils
import org.greenrobot.eventbus.EventBus

object EventBusUtils {
    fun post(any: Any){
        EventBus.getDefault().post(any)
    }
    fun register(any:Any){

        if(!EventBus.getDefault().isRegistered(any)){
            EventBus.getDefault().register(any)
        }else{
            LogUtils.w("$any has registered")
        }
    }
    fun unregister(any: Any){
        EventBus.getDefault().unregister(any)
    }
}